﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;

namespace Me.Practice.ElevatorEngine.Domain.Entity
{
	[Serializable]
    public class Floor
		: ConcurrentQueue<Person>, IComparable<Floor>
	{
		public Floor(Init init)
		{
			Number = init.Number;			
		}
		
		public int Number { get; private set; }		

		public class Init
		{
			public int Number { get; set; }
		}	
		
		int IComparable<Floor>.CompareTo(Floor other) {
		    if (other.Number > Number) return -1;
		    if (other.Number == Number) return 0;
		    return 1;
		}
	}
}
